#include <iostream>
using namespace std;

int main()
{
	int arr[] = {5,4,3,0,6};
    //求数组大小方法1
	cout<<"array length:"<<end(arr)-begin(arr)<<endl;
   //求数组大小方法2
   cout<<"array length:"<<sizeof(arr)/sizeof(arr[0])<<endl;	
	//求数组大小方法3
   cout<<"array length:"<<sizeof(arr)/sizeof(*arr)<<endl;	
	
   cout<<endl;	
   double arr2[5] = {5.11,4.1,3.2,0.66,6.81};
   for(int i=0;i<5;i++){
     cout<< i <<":"<<arr2[i] <<endl;	
   }	
   return 0;
}
/**
array length:5
array length:5
array length:5

0:5.11
1:4.1
2:3.2
3:0.66
4:6.81
*/